package dataThread;

import java.text.ParseException;
import java.util.Date;

public class DateThread implements Runnable {
    @Override
    public void run() {
        String str = DateUtil.getTime(new Date());
        System.out.println(Thread.currentThread().getName() + "time-str" + str);
        try {
            Date date = DateUtil.getDate(str);
            System.out.println(Thread.currentThread().getName() + "-date-" +date);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
}
